#include<stdio.h>
int main()
{
    char s[80],c[80];
    int a, b;
    FILE *fp;
    if((fp=fopen("test","w"))==NULL)
    {
        printf("can't open file")
        return
    }
    fscan(stdin,"%s%d",s,&a)// read from keyboard
    fprintf(fp,"%s %d",s,a) // write to file
    fclose(fp)

    if((fp=fopen("test","r"))==NULL)
    {
                printf("can't open file")
        return
    }
    fscan(fp,"%s%d",s,&b)// read from  file
    fprintf(stdout,"%s %d",s,b) // write to screen
    fclose(fp)
    
}